import java.awt.Graphics;
import java.awt.Image;
import java.awt.Rectangle;

public class ImgClip
{
	Image img;
	Rectangle s;

	public ImgClip(Image i, Rectangle s)
	{

		img = i;
		this.s = s;

	}
	
	public void draw(Graphics g, int x, int y)
	{
		g.drawImage(img, x, y, x+s.width, y+s.height, s.x, s.y, s.x+s.width, s.y+s.height, null);
	}
}
